<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%achievement}}".
 *
 * @property integer $id
 * @property string $full_name
 * @property string $subject
 * @property string $mobile
 * @property string $id_card
 * @property integer $pass
 * @property string $created
 * @property string $updated
 * @property integer $score
 */
class Achievement extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%achievement}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['pass', 'score'], 'integer'],
            [['created', 'updated'], 'safe'],
            [['full_name'], 'string', 'max' => 10],
            [['subject', 'id_card'], 'string', 'max' => 20],
            [['mobile'], 'string', 'max' => 11],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'full_name' => Yii::t('app', '姓名'),
            'subject' => Yii::t('app', '科目'),
            'mobile' => Yii::t('app', '手机'),
            'id_card' => Yii::t('app', '身份证'),
            'pass' => Yii::t('app', '是否合格'),
            'created' => Yii::t('app', '时间'),
            'updated' => Yii::t('app', 'Updated'),
            'score' => Yii::t('app', '分数'),
        ];
    }

    /**
     * @inheritdoc
     * @return AchievementQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new AchievementQuery(get_called_class());
    }
}
